/*
 * @Author: Starfish_DL
 * @Date: 2020-10-15 15:35:38
 * @LastEditors: Starfish_DL
 * @LastEditTime: 2020-10-15 23:58:13
 * @CurrentVersion: 1.0
 * @Description: 
 */

public class Employee implements Cloneable {
    private String name="name";
    private int age=18;
    private double salary=3300.24;

    public String toString() {
        return this.name+" "+Integer.toString(this.age)+" "+Double.toString(this.salary);
    }

    public Employee clone() throws CloneNotSupportedException{
        return (Employee) super.clone();
    }

    public boolean equals(Employee e) {
        if (this.name!=e.name) {
            return false;
        }
        if (this.age!=e.age) {
            return false;
        }
        if (this.salary!=e.salary) {
            return false;
        }
        return true;
    }

    public void finalize() {
        System.out.println("系统即将进行该类垃圾清理！");
    }
}
